<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta charset="utf-8">
    <title>{$theme['title']}</title>
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['YIYE_CSS']}css/dsdialog.css">
    <link href="{$_G['URL']['LJJIAMENG_CSS']}css/all.css" rel="stylesheet" type="text/css" />
    <link href="{$_G['URL']['LJJIAMENG_CSS']}css/content.css" rel="stylesheet" type="text/css" />
    <script src="http://libs.baidu.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="{$_G['URL']['LJJIAMENG_CSS']}js/jquery.dlmenu.js" type="text/javascript"></script>
    <link href="{$_G['URL']['LJJIAMENG_CSS']}css/swiper.min.css" rel="stylesheet" />
    <script src="{$_G['URL']['LJJIAMENG_CSS']}js/swiper.min.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js" type="text/javascript"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/bootstrap.min.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/tinycolor-0.9.15.min.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/jquery.barrager.min.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/shCore.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/shBrushJScript.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/shBrushPhp.js"></script>
    <script type="text/javascript" src="{$_G['URL']['LJJIAMENG_CSS']}js/pick-a-color-1.2.3.min.js"></script>
    <script src="{$_G['URL']['LJJIAMENG_CSS']}js/jquery.lazyload.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['LJJIAMENG_CSS']}css/style.css" />
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['LJJIAMENG_CSS']}css/barrager.css">
    <link rel="stylesheet" type="text/css" href="{$_G['URL']['LJJIAMENG_CSS']}css/pick-a-color-1.2.3.min.css">
    <link type="text/css" rel="stylesheet" href="{$_G['URL']['LJJIAMENG_CSS']}css/shCoreDefault.css" />
    <script type="text/javascript" src="{$_G['URL']['YIYE_CSS']}js/jquery.min.js"></script>
    <script type="text/javascript" src="{$_G['URL']['APP_JS']}util.js"></script>
    <script type="text/javascript" src="{$_G['URL']['APP_JS']}yx.mui.js?v=20160906"></script>
    <!-- <script type="text/javascript" src="{$_G['URL']['APP_JS']}common.js?v=20160906"></script> -->
    <style type="text/css">
    .sydjs .sydjsnr h2 p {
        width: 20%;
    }

    .music {
        right: 3%;
        top: 2em;
        position: fixed;
        z-index: 11111;
    }

    .bgtwo {
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 11111111111;
        display: none;
    }

    .bgtwo li img {
        margin-top: 70%;
        margin-left: 47.5%;
        width: 5%;
    }

    .barrage .z {
        font-size: 15px !important;
    }

    .bgthree{width:100%;height:100%;background:rgba(0,0,0,0.8);position:fixed;top:0px;left:0px;z-index: 11111111111;}
    .bgthree li img{margin-top:70%;margin-left:47.5%;width:5%;}
      .baixian{
    font-size:0;
  }
  .baixian img{
    font-size:0;
    display:block;
    vertical-align:top/middle;
  }
  img{
     pointer-events:none;
  }

    </style>
</head>

<body style=" background-color:#b50818; position:relative;">
<!--     <div class="bgthree">
        <li><img src="{$_G['URL']['LJJIAMENG_CSS']}images/loading.gif"></li>
    </div> -->
    <div class="wrap">
        <!--音乐 start-->
        <div class="rotate px22 music" id="audio_btn">
            <img src="{$_G['URL']['LJJIAMENG_CSS']}images/01.png" width="100%;" />
            <audio autoplay="autoplay" id="media" loop="true" src="{php echo tomedia($config['musicsrc']);}"></audio>
        </div>
        <!--顶部 start-->
        <div class="sydbtu px22">
            <p>
                <img src="{php echo tomedia($config['headlogo']);}" width="100%" />
            </p>
        </div>
        <!--活动倒计时 start-->
        <div class="sydjs px22">
            <div class="sydjsnr">
                <h1>
                    <p>
                        距离活动结束
                    </p>
                </h1>
                <h2 id="fnTimeCountDown" data-end="{php echo date('Y/m/d H:i:s',$theme['endtime']);}">
                    <p>
                        <span class="month">
                        </span>
                        <em>
                            月
                        </em>
                    </p>
                    <p>
                        <span class="day">
                        </span>
                        <em>
                            天
                        </em>
                    </p>
                    <p>
                        <span class="hour">
                        </span>
                        <em>
                            时
                        </em>
                    </p>
                    <p>
                        <span class="mini">
                        </span>
                        <em>
                            分
                        </em>
                    </p>
                    <p>
                        <span class="sec">
                        </span>
                        <em>
                            秒
                        </em>
                    </p>
                    <p>
                        <span class="hm">
                        </span>
                    </p>
                </h2>
            </div>
                    </div>
        <!--参与人数 start-->
        <div class="sycyrs px22">
            <div class="sycyrsnr">
                <h1>
                    <p>
                        参与人数（{$totalsum}人）
                    </p>
                </h1>
                <ul>

                {loop $fanslist $item}

                    <li>
                        <span>
                            <img src="{php echo tomedia($item['avatar']);}" style="width: 3em;height: 3em;" />
                        </span>
                        <em style="font-size: 0.6em;">{$item['username']}</em>
                    </li>
                {/loop}

</ul>
            </div>
        </div>
        <!--商家联盟 start-->
        <div class="baixian" id="centerimgs" style="padding-top: 20px;"></div>
        <div class="sysjlm px22">
            <p>
                <img src="{$_G['URL']['LJJIAMENG_CSS']}images/a2.jpg" width="100%;" />
            </p>
        </div>
        <!--参与人数 start-->
        <div class="syhzsj px22">
            <div class="syhzsjnr">
                <h1>
                    <p>
                        合作商家（{php echo count($logolist);}家）
                    </p>
                </h1>
                <div id="">
                    <ul id="">
                    {loop $logolist $item}
                        <li>
                            {if !empty($item['logo'])}
                            <a href="/{php echo createMobileUrl('viewshop', array('themeid'=>$themeid,'id'=>$item['id']));}">
                                <span>
                                    <img src="{php echo tomedia($item['logo']);}" style="width: 3em;height: 3em;" class="lazy"/>
                                </span>
                                <em style="font-size: 0.6em;">{$item['name']}</em>
                            </a>
                            {/if}
                        </li>
                    {/loop}
                     </ul>
                </div>
            </div>
        </div>
        <!--点击商家头像 start-->
        <div class="sydjsjtx px22">
            <p>
                点击商家头像查看详细信息
            </p>
        </div>

    {loop $grouplist $item}
        <div class="syzyhdbt px22">
            <p>
                <img src="{$_G['URL']['LJJIAMENG_CSS']}images/a5.png" width="100%" />
            </p>
        </div>

        <div class="swiper-container px22">
            <div class="swiper-wrapper">

                {loop $item['shoplist'] $shop}
                <div class="swiper-slide" onclick="go_detail('{$shop['id']}')">
                    <div class="sjxqjs">
                        <div class="zuo">
                            <p>
                                <img data-src="{php echo tomedia($shop['logo']);}" style="width: 6em;height: 6em;" class="swiper-lazy"/>
                            </p>
                        </div>
                        <div class="you">
                            <ul>
                                <li style=" background-image:url({$_G['URL']['LJJIAMENG_CSS']}images/a1.png); background-position:left center; background-repeat:no-repeat; background-size:7%;">{$shop['name']}</li>
                                <li style=" background-image:url({$_G['URL']['LJJIAMENG_CSS']}images/a3.png); background-position:left center; background-repeat:no-repeat; background-size:7%;">{$shop['address']}</li>
                            </ul>
                        </div>
                    </div>
                    <div class="sjquan">
                        <div class="sjquannr">
                            <div class="zuo">
                                <p style="height: 3.8em;line-height: 3.8em;">
                                    卡券
                                </p>
                                <!-- <span>
                                    点击领取
                                </span> -->
                            </div>
                            <div class="you">
                                <p>{$shop['text1']}</p>
                                <span>{$shop['text2']}</span>
                            </div>
                        </div>
                    </div>
                </div>
                {/loop}
                            </div>
        </div>

    {/loop}
        {if $tempcount==0}

        <div class="mfyp px22">
            <div class="bt">
                <p>
                    购买记录（{$totalsum}人）
                </p>
            </div>
            <div class="scrollDiv" id="s2">
                <ul>
                {loop $fanslist $item}
                    <li>
                        <h1>
                            <p>
                                <img src="{php echo tomedia($item['avatar']);}" style="width: 2em;height: 2em;" />
                            </p>
                        </h1>
                        <h2>
                            <p>
                                <span>{$item['username']}</span>
                                <em style=" color:#ff4542;">
                                    已经支付 ¥{$item['fee']}</em>
                            </p>
                            <p>
                                <span style=" font-size:0.9em; color:#666;">
                                    {php echo mb_substr($theme['jubf'],0,10,'utf-8');}                               </span>
                                <em style=" color:#666; font-size:0.9em;">
                                    {php echo date('Y/m/d H:i:s',$item['addtime']);} </em>
                            </p>
                        </h2>
                    </li>
                {/loop}
                </ul>
            </div>
        </div>
        {/if}
        <!--活动介绍 start-->
        <div class="px22 baixian">
            <div class="hdgznr" id="content" >
            </div>
        </div>

        <div class="syzygg px22">
            <p>
                <img src="{$_G['URL']['LJJIAMENG_CSS']}images/a4.jpg" width="100%;" />
            </p>
        </div>
        <!--优惠券 start-->
        <div class="syyhq px22">

    {loop $grouplist $item}
        {loop $item['shoplist'] $shop}
            <div class="yhquan">
                <div class="zuo">
                    <p>
                        <img src="{php echo tomedia($shop['logo']);}" style="width: 5em;height: 5em;" class="lazy"/>
                    </p>
                </div>
                <div class="you">
                    <div class="younr">
                        <a href="/{php echo createMobileUrl('viewshop', array('themeid'=>$themeid,'id'=>$shop['id']));}">
                            <span>{$shop['name']}</span>
                            <span>{php echo empty($shop['text3'])?$shop['text1']:$shop['text3'];}</span>
                                <p>{php echo empty($shop['text4'])?$shop['text2']:$shop['text4'];}</p>
                                <p>
                                {$theme['jubf']} 点击查看
                            </p>
                        </a>
                    </div>
                    <!-- <div class="djlq">
                        <p>
                            <input name="txBox" onclick="txBox()" type="button" value="立即领取" />
                        </p>
                    </div> -->
                </div>
            </div>
            {/loop}
        {/loop}
        </div>
{if $config['iscommshow']>=1}
        <div class="syhbphb px22">
            <div class="hbphbbt">
                <p>
                    <img src="{$_G['URL']['LJJIAMENG_CSS']}images/a14.png" width="100%" />
                </p>
            </div>
            <div class="hbphbnr">
                <h1>
                    <p>
                        -赚钱排行榜-
                    </p>
                </h1>
                <div class="phbbtou">
                    <ul>
                        <li>
                            排名
                        </li>
                        <li>
                            推荐数
                        </li>
                        <li>
                            佣金（元）
                        </li>
                    </ul>
                </div>
                <div class="phbnrong">
                     
                {loop $commslist $cindexno $row}
                     <ul>
                        <li>
                            {if empty($row['nickname'])}null{$row['uid']}{else}{php echo mb_substr($row['nickname'],0,5,'utf-8');}{/if}
                        </li>
                        <li>
                            {$row['commcount']}人
                        </li>
                        <li style=" color:#b50818;">
                            {$row['feesum']}元
                        </li>
                    </ul>
                {/loop}
                </div>
            </div>
        </div>
{/if}
{if $theme['yixuanbanquan'] != '1'}
        <div class="syhdgz px22">
            <div class="hdgznr" style="padding: 0 3%">
                <p style="text-align: center;"><a style="color: #ffe3b5" href="{php echo empty($theme['USERURL'])?$system['s']['yixuanurl']:$theme['USERURL'];}">{php echo empty($theme['USERJISHU'])?$system['s']['yixuanjishu']:html_entity_decode($theme['USERJISHU'], ENT_QUOTES);}</a></p>
            </div>
        </div>
{/if}

<!--         <div class="sykaqdw px22" style="bottom: 10em;">
            <p>
                <a href="/{php echo createMobileUrl('myorder', array('themeid'=>$theme['id']));}">
                    <img src="{$_G['URL']['LJJIAMENG_CSS']}images/a16.png" width="100%" />
                </a>
            </p>
        </div> -->

<link href="{$_G['URL']['DUOSHANGJIA_CSS']}css/index.css" rel="stylesheet">

<style type="text/css">
    .float_tel img {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
        margin-bottom: 0.1rem;
    }
    .float_coupons img {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
    }
    .float_coupons img {
        width: 3rem;
        height: 3rem;
        border-radius: 50%;
    }
    .float_join img {
        width: 4rem;
    }
    .float_you {
        position: fixed;
        bottom: 10%;
        right: 0.35rem;
        z-index: 99999;
        font-size: 42px;
    }

</style>

<!--浮动小元素-->
    <div class="float_you">
        <div class="float_tel"><a href="javascript:;" onclick="showkfewm()" ><img src="{$_G['URL']['DUOSHANGJIA_CSS']}images/float_tel.png" alt=""></a></div>
        {if $config['isposter']==1}
        <div class="float_coupons"><a href="javascript:;" onclick="showposter()"><img src="{$_G['URL']['DUOSHANGJIA_CSS']}images/float_coupons1.png" alt=""></a></div>
        {/if}
        {if (!empty($myworker))}
        <div class="float_coupons"><a href="{php echo $_G['siteroot'].createMobileUrl("w_index",array("themeid"=>$themeid));}"><img src="{$_G['URL']['DUOSHANGJIA_CSS']}images/float_coupons2.png" alt=""></a></div>
        {/if}
    </div>
    <div class="float_join" style="right: 0.1rem; width: 50px;
"><a href="{php echo $_G['siteroot'].createMobileUrl("joinshop",array("themeid"=>$themeid,"workerid"=>$workerid,"recordid"=>$recordid));}"><img src="{$_G['URL']['DUOSHANGJIA_CSS']}images/float_join.png" alt=""></a></div>
<!--浮动小元素-->
        <div class="kong" style="height:1em">
        </div>
        <div class="zxgdb px22">
            {if empty($themyrecordid)}
            <div class="sjdjs">
                <div class="sjdjsbt">
                    <p>距离结束时间</p>
                </div>
                <div class="sjdjsnr" id="fnTimeCountDown2" data-end="{php echo date('Y/m/d H:i:s',$theme['endtime']);}">
                    <p><span class="month"></span><em>月</em><span class="day"></span><em>天</em><span class="hour"></span><em>时</em><span class="mini"></span><em>分</em><span class="sec"></span><em>秒</em></p>
                </div>
            </div>
            <div class="ljqg">
                <p><input type="button" name="" value="{php echo str_replace('<em>','',str_replace('</em>','',str_replace('<br>','',$formtextcenter))) ;}" onclick="txBox()"></p>
            </div>
            {else}
            <div class="sjdjs">
                <p><input type="button" name="" value="{$config['lablesuccess']}" ></p>
            </div>
            <div class="ljqg">
                <p><input style="background-color: #FD7A0A;" type="button" name="" value="到店领取/兑换" onclick="hedui()"></p>
            </div>
            {/if}
        </div>
                <!--footer end-->
        <div id="txpLayer">
        </div>
        <div id="txBox">
            <div class="close px22">
                <a href="javascript:void(0)" onclick="closeBox()">
                    关闭
                </a>
            </div>
            <div class="nytxxx px22">
                <div class="txxxnr">
                    <form onsubmit="return false;">
                        <span>
                            请正确填写购买信息
                        </span>

            {if $config['shopstype'] == 0 }
                {if !empty($config['shops'])}
                    {if !empty($config['options'])}

                        <p>
                            <select style="color:#757575; background-color:#fff; width:99%; padding-left:3%; font-size:1.2em;border-radius:5px;-moz-border-radius:5px; -webkit-border-radius:5px;border:1px solid #dedede;display:block; display:block;height:3em; line-height:3em; margin-top:1em;" id="shoptitle" name="shoptitle" onchange="select_way(this.value)">
                                <option value="">请选择{$config['shops']}</option>
                            {loop $config['options'] $row}
                                <option value="{$row} {if $row==$themyrecord['option']}selected="selected"{/if}">{$row}</option>
                            {/loop}
                            </select>
                        </p>

                    {/if}
                {else}
                <input  type="hidden" name="shoptitle" value="默认" id="shoptitle">
                {/if}
            {/if}

                        <p>
                            <input id="regname_order" name="regname_order" placeholder="请输入{$config['nametext']}" type="text" required="" value="{$_G['member']['username']}" />
                        </p>
                        <p>
                            <input id="username_order" name="username_order" placeholder="请输入{$config['mobiletext']}" type="text" required="" value="{$_G['member']['mobile']}" />
                        </p>
                        <p {if empty($config['address'])}style="display: none;"{/if}>
                            <input placeholder="{$config['address']}必填" type="text" name="address_order" value="{$member['address']}" id="address_order">
                        </p>


                        {if $config['shopstype'] > 0 }
                            <p {if empty($config['shops'])}style="display: none;"{/if}>
                                <input placeholder="{$config['shops']}必填" type="{php echo $config['shopstype']==2?'tel':'text';}" name="shoptitle" value="{$member['option']}" id="shoptitle">
                            </p>
                        {/if}
                        
                        {if $config['datetimetype'] > 0 }
                            <p {if empty($config['datetime'])}style="display: none;"{/if}>
                                <input placeholder="{$config['datetime']}必填" type="{php echo $config['datetimetype']==2?'tel':'text';}" name="date_order" value="{$member['datetime']}" id="date_order">
                            </p>
                        {else}
                            <p {if empty($config['datetime'])}style="display: none;"{/if}>
                                <input class="weui-input" placeholder="{$config['datetime']}" type="text" onfocus="(this.type='date')" value="{$member['datetime']}" name="date_order" id="date_order"/>
                            </p>
                        {/if}

 
                        <p style=" width: 100%;float: left; height: 20px; padding-left: 0px; color: #000; {if empty($config['xieyi'])}display: none;{/if}">
                            <input style="    float: left;outline: none;border: none; padding: 0;
                height: 20px;    line-height: 20px;width: 10%; text-indent: 5px;" placeholder="{$config['xieyi']}必填" type="checkbox" name="xieyi" value="{$member['xieyi']}" id="xieyi_order">
                            <label>{$config['xieyi']}</label>
                        </p>
                        <p>
                            <input type="hidden" id="tijiao" value="0">
                            <input type="hidden" id="check_type" name="check_type" value="3">
                            <input type="submit" value="{$config['formtextpay']}" href="javascript:;" id="topay" />
                        </p>
                    </form>
                </div>
            </div>
        </div>
        <input type="hidden" id="pid" name="pid" value="46112">
    </div>
    <div class="bgtwo">
        <li><img src="{$_G['URL']['LJJIAMENG_CSS']}images/loading.gif"></li>
    </div>
        <div id="bg" style="width:100%;height:100%;text-align: center;background:rgba(0,0,0,0.8);position:fixed;top:0px;left:0px;z-index: 11111111111;display: none;" onclick="rd_url()">
        <img src="http://ant.jiajiayong.com/yinggou/public/uploads/20190516/22ad6658989190c6a69d47b9f897f1d8.jpg" alt="" style="width: 90%; margin: 15% auto;border-radius: 10px;">
        <p style="font-size: 18px;color: white;" id="text">1</p>
    </div>

<script src="{$_G['URL']['LJJIAMENG_CSS']}js/distpicker.js"></script>
<script>
/*点击弹出按钮*/
function txBox() {
    var txBox = document.getElementById("txBox");
    var txLayer = document.getElementById("txpLayer");
    txBox.style.display = "block";
    txLayer.style.display = "block";
};

function hedui() {
    window.location.href="/{php echo  createMobileUrl('myorder', array('themeid'=>$theme['id']));}";
};

/*点击关闭按钮*/
function closeBox() {
    var txBox = document.getElementById("txBox");
    var txLayer = document.getElementById("txpLayer");
    txBox.style.display = "none";
    txLayer.style.display = "none";
}
</script>
<script type="text/javascript">
//滚动插件
(function($) {
    $.fn.extend({
        Scroll: function(opt, callback) {
            //参数初始化
            if (!opt) var opt = {};
            var _this = this.eq(0).find("ul:first");
            var lineH = _this.find("li:first").height(), //获取行高
                line = opt.line ? parseInt(opt.line, 10) : parseInt(this.height() / lineH, 10), //每次滚动的行数，默认为一屏，即父容器高度
                speed = opt.speed ? parseInt(opt.speed, 10) : 500, //卷动速度，数值越大，速度越慢（毫秒）
                timer = opt.timer ? parseInt(opt.timer, 10) : 3000; //滚动的时间间隔（毫秒）
            if (line == 0) line = 1;
            var upHeight = 0 - line * lineH;
            //滚动函数
            scrollUp = function() {
                _this.animate({
                    marginTop: upHeight
                }, speed, function() {
                    for (i = 1; i <= line; i++) {
                        _this.find("li:first").appendTo(_this);
                    }
                    _this.css({ marginTop: 0 });
                });
            }
            //鼠标事件绑定
            _this.hover(function() {
                clearInterval(timerID);
            }, function() {
                timerID = setInterval("scrollUp()", timer);
            }).mouseout();
        }
    });
})(jQuery);
</script>
<script>
var swiper = new Swiper('.swiper-container', {
    //autoplay:true,//等同于以下设置
    autoplay: {
        delay: 3000,
        stopOnLastSlide: false,
        disableOnInteraction: false,
    },
    lazy: {
        loadPrevNext: true,
    },
});
</script>
<script type="text/javascript">
$.extend($.fn, {
    fnTimeCountDown: function(d) {
        this.each(function() {
            var $this = $(this);
            var o = {
                hm: $this.find(".hm"),
                sec: $this.find(".sec"),
                mini: $this.find(".mini"),
                hour: $this.find(".hour"),
                day: $this.find(".day"),
                month: $this.find(".month"),
                year: $this.find(".year")
            };
            var f = {
                haomiao: function(n) {
                    if (n < 10) return "00" + n.toString();
                    if (n < 100) return "0" + n.toString();
                    return n.toString();
                },
                zero: function(n) {
                    var _n = parseInt(n, 10); //解析字符串,返回整数
                    if (_n > 0) {
                        if (_n <= 9) {
                            _n = "0" + _n
                        }
                        return String(_n);
                    } else {
                        return "00";
                    }
                },
                dv: function() {
                    //d = d || Date.UTC(2050, 0, 1); //如果未定义时间，则我们设定倒计时日期是2050年1月1日
                    var _d = $this.data("end") || d;
                    var now = new Date(),
                        endDate = new Date(_d);
                    //现在将来秒差值
                    //alert(future.getTimezoneOffset());
                    var dur = (endDate - now.getTime()) / 1000,
                        mss = endDate - now.getTime(),
                        pms = {
                            hm: "000",
                            sec: "00",
                            mini: "00",
                            hour: "00",
                            day: "00",
                            month: "00",
                            year: "0"
                        };
                    if (mss > 0) {
                        pms.hm = f.haomiao(mss % 1000);
                        pms.sec = f.zero(dur % 60);
                        pms.mini = Math.floor((dur / 60)) > 0 ? f.zero(Math.floor((dur / 60)) % 60) : "00";
                        pms.hour = Math.floor((dur / 3600)) > 0 ? f.zero(Math.floor((dur / 3600)) % 24) : "00";
                        var date_n = new Date();
                        var year_n = date_n.getFullYear();
                        var month_n = date_n.getMonth()+1;
                        var d_n = new Date(year_n, month_n, 0);
                        //console.log(d_n.getDate()*3600*24);
                        pms.day = Math.floor((dur / 86400)) > 0 ? f.zero(Math.floor((dur / 86400)) % d_n.getDate()) : "00";
                        //月份，以实际平均每月秒数计算
                        pms.month = Math.floor((dur / (d_n.getDate()*3600*24))) > 0 ? f.zero(Math.floor((dur / (d_n.getDate()*3600*24))) % 12) : "00";
                        //年份，按按回归年365天5时48分46秒算
                        pms.year = Math.floor((dur / 31556926)) > 0 ? Math.floor((dur / 31556926)) : "0";
                    } else {
                        pms.year = pms.month = pms.day = pms.hour = pms.mini = pms.sec = "00";
                        pms.hm = "000";
                        // console.log('结束');
                        // alert('活动已结束');
                        // location.reload();
                        // $.get("/yinggou/public/index/activity/activity_status.html", { activity_id: 59, }, function(data, textStatus, xhr) {
                        //     console.log(data);
                        //     if (data) {
                        //         location.replace(location.href);
                        //     }
                        // });
                        return;
                    }
                    return pms;
                },
                ui: function() {
                    if (o.hm) {
                        o.hm.html(f.dv().hm);
                    }
                    if (o.sec) {
                        o.sec.html(f.dv().sec);
                    }
                    if (o.mini) {
                        o.mini.html(f.dv().mini);
                    }
                    if (o.hour) {
                        o.hour.html(f.dv().hour);
                    }
                    if (o.day) {
                        o.day.html(f.dv().day);
                    }
                    if (o.month) {
                        o.month.html(f.dv().month);
                    }
                    if (o.year) {
                        o.year.html(f.dv().year);
                    }
                    setTimeout(f.ui, 1);
                }
            };
            f.ui();
        });
    }
});
</script>
<script type="text/javascript">
$("#fnTimeCountDown").fnTimeCountDown("{php echo date('Y/m/d H:i:s',$theme['endtime']);}");
$("#fnTimeCountDown2").fnTimeCountDown("{php echo date('Y/m/d H:i:s',$theme['endtime']);}");
</script>
<script>
var x = document.getElementById("media");
window.onload = function() {
    $(".bgthree").hide();
    $("#audio_btn").click(function() {
        //控制音乐图标 自转或暂停
        $(this).toggleClass("rotate");
        //控制背景音乐 播放或暂停            
        if ($(this).hasClass("rotate")) {
            x.play();
        } else {
            x.pause();
        }
    });
    //每条弹幕发送间隔
    looper_time = 5 * 1000;
    //是否首次执行
    run_once = true;
    do_barrager();
    $("#s2").Scroll({ line: 0.1, speed: 2000, timer: 10 });
    var voice = document.getElementById('media');
    //调用 <audio> 元素提供的方法 play()
    voice.play();
    //判斷 WeixinJSBridge 是否存在
    if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
        voice.play();
    } else {
        //監聽客户端抛出事件"WeixinJSBridgeReady"
        if (document.addEventListener) {
            document.addEventListener("WeixinJSBridgeReady", function() {
                voice.play();
            }, false);
        } else if (document.attachEvent) {
            document.attachEvent("WeixinJSBridgeReady", function() {
                voice.play();
            });
            document.attachEvent("onWeixinJSBridgeReady", function() {
                voice.play();
            });
        }
    }
};
</script>

<script type="text/javascript">
document.addEventListener("visibilitychange", function() {
    if (document.hidden === true) {
        clearInterval(looper);
    } else {
        looper_time = 5 * 1000;
        //是否首次执行
        run_once = true;
        do_barrager();
    }
});

function do_barrager() {
    if (run_once) {
        //如果是首次执行,则设置一个定时器,并且把首次执行置为false
        looper = setInterval(do_barrager, looper_time);
        run_once = false;
    }
    //获取
    // $.getJSON('barrages?id=' + 59, function(data) {
    //     //是否有数据
    //     if (data.info) {
    //         $('body').barrager(data);
    //     }
    // });
}
</script>
<script type="text/javascript">
function select_way(value) {
    if (value == '0' || value == '') {
        $('#notice').hide();
        $('#address').hide();
        $('#address_detail').hide();
    }
    if (value == '1') {
        $('#notice').show();
        $('#address').show();
        $('#address_detail').show();
    }
}

//跳转到商家详情
function go_detail(id) {
    var url = "/{php echo createMobileUrl('viewshop', array('themeid'=>$themeid,'id'=>'sid'));}";
    var url = url.replace('sid', id);
    window.location.href = url;
}

function rd_url() {
    window.location.href = "/yinggou/public/index/activity/group_qrcode.html?activity_id=59&order_id=" + order_id;
}

</script>
<!-- <script type="text/javascript">
    $(function() {
        $("img.lazy").lazyload()
    });
</script> -->

<script type="text/javascript" src="{$_G['URL']['YIYE_CSS']}js/dsdialog.js"></script>
{include file='lijianduoshangjia/wxpay'}

{include file='base/kefu'}
{include file='base/sharepyq'}